//
//  YQGoodsOrderModel.m
//  MuYing
//
//  Created by tbb on 2020/3/2.
//  Copyright © 2020 TBB. All rights reserved.
//

#import "YQGoodsOrderModel.h"

@implementation YQGoodsOrderModel
+ (nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass {
    return @{@"orderItemList":[YQGoodsOrderItemModel class] 
            };
}

-(NSInteger)totalGoodsNum {
    if (!_totalGoodsNum) {
        _totalGoodsNum = 0;
        for (YQGoodsOrderItemModel *itemModel in self.orderItemList) {
            _totalGoodsNum += itemModel.goodsNum;
        }
    }
    return _totalGoodsNum;
}

@end

@implementation YQGoodsOrderItemModel

 @end
